

<script type="text/javascript" src="<?=userassets?>core_js/pay_pass.js"></script>
<body>
<?=pay_passtemplate()?>
<?php if ($my == "list") : ?>
<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-lg-12">
          <div class="card">
            <div class="card-body">  
            <div class="list-group-item reed"><marquee scrollamount="<?=$conf['gggdsd']?>" direction="left" align="Middle" style="font-weight: bold;line-height: 20px;font-size: 20px;color: #FF0000;" onmouseover="stop();" onmouseout="start();"> <?=$conf['erweimagg']?></marquee></div>
            <b class="btn btn-sm btn-default">正常:
            <b class="btn btn-sm btn-default">支付宝:<a style="color: blue;"><?=$cookie_ok_counts['alipay']?></a>个</b>
            <b class="btn btn-sm btn-default">微  信:<a style="color: blue;"><?=$cookie_ok_counts['wxpay']?></a>个</b>
            <b class="btn btn-sm btn-default">QQ钱包:<a style="color: blue;"><?=$cookie_ok_counts['qqpay']?></a>个</b></b>
            <br>	
            <b class="btn btn-sm btn-default">失效:
            <b class="btn btn-sm btn-default">支付宝:<a style="color: red;"><?=$cookie_no_counts['alipay']?></a>个</b>
            <b class="btn btn-sm btn-default">微  信:<a style="color: red;"><?=$cookie_no_counts['wxpay']?></a>个</b>
            <b class="btn btn-sm btn-default">QQ钱包:<a style="color: red;"><?=$cookie_no_counts['qqpay']?></a>个</b>	</b>
            <br>   
            <a data-toggle="modal" class="modal-basic" href="#modalHeaderColorInfo_Up_Qr_modal" data-target="#modalHeaderColorInfo_Up_Qr_modal" data-id="modalHeaderColorInfo_Up_Qr_modal" id="Up_Qr_modal"></a>
            </div>
           <div class="form-group mb-2"> 
             <div class="text-right">
                 <button class="btn btn-success btn-round"><i class="mdi mdi-bolnisi-cross"></i> <?php echo $con;?></button>
                 <button class="btn btn-primary btn-round" id="show-popup-btn">获取支付宝UID</button>
                 <button data-toggle="modal"  class="btn btn-info btn-round" href="#modalHeaderColorInfo" data-target="#modalHeaderColorInfo" data-id="modalHeaderColorInfo"><i class="fa fa-plus"></i> 新增通道 (当前：<a style="color: blue;"><?=$numrows?></a>/最大：<a style="color: blue;"><?=$conf['qr_nums']?$conf['qr_nums']:$userrow['qr_nums']?></a>)</button>
                </div>
            </div>
            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                        <th>#</th>
						<th>数据</th>
						<th>更新时间/运行时间</th>
						</tr>
					 </thead>
					<tbody>	
					<?php 
					    foreach ($result as $res){
					        $rowData = [
					             ['label' => '<a href="javascript:;" onclick="showQrlist(\''.$res['id'].'\');" title="点击查看详情">'.$res['id'].'</a>'],
					             ['label'=>generateQRListItem($res)],
					             ['label'=>generateQRStatusItem($res)]
					            ];
					         $html .= Splicing_form($rowData);   
					    }
					    echo $html;
					    table_page($page,$pages,'Qrlist')
					?>
                 </div>
            </div>
         </div>   
      </div>      
  </div>          
<?php endif; ?>	
<?php if ($my == "edit") : ?>
    <div class="container-fluid p-t-15">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                <div class="card-body">  
                 <input type="hidden" class="form-control" id="id" value="<?=$row['id']?>" >
                <div class="form-group">
                    <label>二维码备注:</label><br>
                    <input type="text" class="form-control" id="beizhu" value="<?=$row['beizhu']?>" >
                </div>
                <div class="form-group">
                    <label>CK状态:</label><br>
                    <input type="text" class="form-control" value="<?=$ckstatus?>" readonly="readonly" placeholder="若为空则CK已失效，请勿强制开启收款.">
                </div>
                <?=$app?>
                <div class="form-group">
                    <label>二维码状态:</label><br>
                    <select class="form-control" id="status" default="">
                        <option value="1" <?= $row['status'] == '1' ? "selected" : "" ?>>开启</option>
                        <option value="0" <?= $row['status'] == '0' ? "selected" : "" ?>>关闭</option>
                     </select>  
                  </div> 
                <div class="form-group">
                      <label>轮训顺序:</label><br>
                       <input class="form-control" type="number" id="nums" name="nums" value="<?=$row['nums'];?>" min="0" max="10">
                      <b>数字小的优先 默认0</b>
                </div>
                 <div class="form-group">
                     <label>风控监控开关:</label><br>
                     <select class="form-control" id="stat"  default="">
                         <option value="1" <?= $row['stat'] == '1' ? "selected" : "" ?>>开启</option>
                         <option value="0" <?= ($row['stat'] == '0' || !$row['stat']) ? "selected" : "" ?>>关闭</option>
                     </select>
                 </div>  
                 <button type="sumbit" class="btn btn-primary btn-block" onclick="edit_Qr();">确认以上并修改</button>	
<?php endif; ?>	



<div class="modal inmodal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
			</div>
            <div class="modal-body">
                有CK失效或未更新CK的二维码,请去更新!
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="popup-modal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">支付宝 uid获取</h5>
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
      </div>
      <div class="modal-body">
           <p>请用手机支付宝 扫码 并复制其中的 user_id 即可 如 20*****93 然后填入 支付宝 uid里面即可</p>
        <img src="/Core/assets/img/uid.png" alt="获取uid">
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

<div class="modal fade bs-example-modal-center"   id="modalHeaderColorInfo_Up_Qr_modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
         <div class="modal-dialog modal-dialog-centered">
           <div class="modal-content">
             <div class="modal-header">
               <h5 class="modal-title" id="exampleModalLabel">更新二维码</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                 <span aria-hidden="true">&times;</span>
                 </button>
                  </div>
					<div class="modal-body">
					<input type="hidden" name="Up_id" id="Up_id" value=""/>
                           <div class="form-group">
                           <label id="Up_LoginQrcode_msg">请用对应二维码的支付宝或QQ扫码哦</label><br><div id="Up_LoginQrcode">
                           </div>
							<a id="Up_Wx_Sumbit"></a>		
					</div>
				</div>
			</div>
        </div>
    </div>
 </div>
         

<div class="modal fade" id="modalHeaderColorInfo" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> 
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header bg-cyan">
                <h5 class="modal-title text-white" id="">添加二维码</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" class="close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
             <div class="modal-body">
                 <div class="form-group">
                     <label>支付通道:</label><br>
                     <select class="form-control" name="type" id="type">
                         <option value="">请选择支付通道</option>
                         <option value="alipay">支付宝-><?=checkVipStatus('alipay')?></option>
                         <option value="qqpay">QQ-><?=checkVipStatus('qqpay')?></option>
                         <option value="wxpay">微信-><?=checkVipStatus('wxpay')?></option>
                     </select>
                </div>
                <?=displaynoneuser($option,$macurl,$uosurl)?>
                  
                <div class="form-group">
                    <label id="beizhu_name">备注:</label><br>
                    <input type="text" class="form-control" id="beizhu" value="" placeholder="" name="beizhu">
                </div>
                <div class="form-group">
                    <div id='xf_tishi'></div>
                    <label id="LoginQrcode_msg">确保所有信息填写正确哦</label><br>
                    <div id="LoginQrcode"></div>
                    <a id="Wx_Sumbit"></a>			
                </div>
              </div>
        </div>  
    </div>  
</div>     
</body>

<script>
<?php if(($cookie_no_counts['alipay'] || $cookie_no_counts['wxpay'] || $cookie_no_counts['qqpay'])&& $my!='edit' ){?>
$('#myModal').modal('show');
<?php }?>


</script>
<script src="<?=userassets?>core_js/showQrlist.js"></script>
<script src="<?=userassets?>core_js/Del_Qr.js"></script>
<script src="<?=userassets?>core_js/SelectQrlist.js"></script>
<script src="<?=userassets?>core_js/Qrlist.js"></script>
<script src="<?=userassets?>core_js/UPQrlist.js"></script>
<script src="<?=userassets?>core_js/QQPCQrlist.js"></script>
<script src="<?=userassets?>core_js/WXQrlist.js"></script>